package com.devin.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.core.MessageSendingOperations;
import org.springframework.messaging.simp.SimpMessagingTemplate;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author: simpl
 * @date: 2020/3/20
 * @time: 20:01
 * @description: 
 */
@Configuration
public class SpringBeanConfig {

//    @Autowired
//    private SimpMessagingTemplate simpMessagingTemplate;
//
//    @Scheduled(fixedRate = 1000)
//    public void sendScheduled(){
//        System.out.println("服务端开始发送消息");
//        simpMessagingTemplate.convertAndSend("/server/scheduledMessage",System.currentTimeMillis());
//    }

//    @Bean
//    public MessageSendingOperations messagingTemplate() {
//        return new SimpMessagingTemplate();
//    }
//
//    public MessageChannel getMessageChannel(){
//        new MessageChannel()
//    }
}
